package jw.hospital.hosp.model.cmn;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
@ApiModel(value = "数据字典")
@TableName(value = "dict")
public class Dict  {
    private  static  final   long serialVersionUID =1L;

    @ApiModelProperty(value = "id")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "上级ID")
    @TableField(value = "parent_id")
    private  Long  parentId;

    @ApiModelProperty(value = "名称")
    @TableField(value = "name")
    private  String  name;

    @ApiModelProperty(value = "值")
    @TableField(value = "value")
    private  String   value;

    @ApiModelProperty(value = "编码")
    @TableField(value = "dict_code")
    private   String  dictCode;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT, value = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT, value = "create_by")
    public String createBy;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE, value = "update_time")
    private Date updateTime;

    @ApiModelProperty(value = "修改人")
    @TableField(fill = FieldFill.INSERT_UPDATE,value = "update_by")
    public  String  updateBy;

    @ApiModelProperty(value = "逻辑删除（0：未删除，1：已删除）")
    @TableLogic
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    @ApiModelProperty(value = "其他参数")
    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();

    @ApiModelProperty(value = "包含子节点")
    @TableField(exist = false)
    private  boolean  hasChildren;



}
